Add wp db status command for database health overview#307
Open
Add wp db status command for database health overview#307
wp db status command for database health overview#307Conversation
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add wp db status command for database health overview
Add Feb 1, 2026
wp db status command for database health overview
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
wp db statuscommand that provides a consolidated view of database health and configuration information in a single command, eliminating the need to run multiple separate database commands (wp db size,wp db tables,wp db prefix,wp db check).Implementation
New
status()method inDB_Commandclass that works without loading WordPressself::run()method instead of$wpdbfor database informationinformation_schema.TABLESfor table count, size, engine, charset, and collation$table_prefixvariable (wp-config.php)mysqlcheckfor health status--dbuser,--dbpass, and--defaultsoptions for authenticationCommand registration in
composer.jsonComprehensive Behat test coverage with regex matching for dynamic values and credential option testing
Key Features
after_wp_config_loadlevel (class default), similar towp db query$wpdbobjectaddslashes()with LIKE pattern escaping for securityOutput Example
Notes
wp db size --human-readablebehaviorOriginal prompt
wp db statuscommand for quick database health overview #306✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.